package com.stefan.service.impl;


import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit.jupiter.SpringExtension;

@SpringBootTest
@ExtendWith(SpringExtension.class)
public class ShortListServiceImplTester {
    @Autowired
    private  ShortListServiceImpl service;
    @Test
    public void testAddProduct() {
        // 测试添加商品到收藏列表
        for (int i = 1; i <=11; i++) {
            service.addProduct("customer1", "product"+i);
        }

    }
    @Test
    public void testGetProducts() {
        // 测试获取用户收藏列表中的特定商品
        System.out.println(service.removeProduct("customer1", "product11"));
    }
    @Test
    public void testGetAllProducts() {
        // 测试获取用户收藏列表中的所有商品
        System.out.println(service.getAllProducts("customer1"));
    }

}


